#!/usr/bin/env python
from django.contrib import admin
from models import Contact, Contacter, ContacterGroup, ContacterTitle, ContacterDepartment

class ContactAdmin( admin.TabularInline ):
    model = Contact
    
class ContacterAdmin( admin.ModelAdmin ):
    list_display = ( "name", "company", "title", "phone1", "email1" )
    search_fields = ( "name", "company", "title", "phone1", "phone2", "email1", "email2", "address1", "address2", "website", "group", )
    
    list_filter = ( "title", "group", "company" )
    list_per_page = 100

    inlines = [
        ContactAdmin,
        ]
    
admin.site.register( ContacterGroup )
admin.site.register( ContacterTitle )
admin.site.register( ContacterDepartment )
admin.site.register( Contacter, ContacterAdmin )
admin.site.register( Contact )